<template>
    <div class="change-view">
        <div class="header">
            <div class="tabs">
                <router-link
                    to="/change/firstCreateWarehouse"
                    class="tab"
                    active-class="active"
                >首次建仓收益</router-link>
                <router-link
                    to="/change/aveCreateWarehouse"
                    class="tab"
                    active-class="active"
                >平均建仓收益</router-link>
                <router-link
                    to="/change/sellEarnings"
                    class="tab"
                    active-class="active"
                >已售股票收益</router-link>
            </div>
        </div>
        <router-view />
        <BottomNav/>
    </div>
</template>

<script>
import BottomNav from '../components/BottomNav.vue'


export default {
    name: 'ChangeView',
    components: {
        BottomNav
    },
    data() {
    },

}
</script>

<style scoped>
.tabs {
    padding-bottom: 5px;
}

.tab {
    display: inline-block;
    padding: 5px 20px;
    color: #333;
    font-size: 16px;
    margin-left: 10px;
}
.tab:hover {
    border-bottom: 2px solid #1890ff;
    cursor: pointer;
}
.change-view {
    padding: 20px;
    padding-bottom: 100px; /* 为底部导航栏留出空间 */
    background-color: #f5f5f5;
    height: 640px;
}

.header {
    height: 70px;
    border-radius: 12px;
    background-color: #fff;
    padding: 16px 0;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}
.tab.active {
    border-bottom: 2px solid #1890ff;
}
.tabs * {
    text-decoration: none;
}


@media (max-width: 480px) {
    .change-view {
        padding: 10px;
        padding-bottom: 80px;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab {
        padding: 6px 12px;
        font-size: 13px;
    }
}
</style>
